The invention relates to a clamping apparatus and a clamping method which are suitable when they are used to clamp an output of an optical black portion in an image pickup output of a CCD image pickup device to a black level in, for example, a digital still camera, a digital video camera, or the like.
In a video camera, a CCD (Charge Coupled Device) image pickup device is used as an image pickup device. Not only a photoelectric conversion output which is caused when the light is irradiated onto a photosensing surface of the CCD image pickup device but also a component of a dark current which is caused when no light is irradiated are included in an output of the CCD image pickup device. Therefore, an optical black portion is provided for the CCD image pickup device and a process for setting an output of the optical black portion to a black level is performed.
That is, a masking region 21 is provided for the CCD image pickup device as shown in FIG. 1. The masking region 21 is perfectly shielded against the light and the portion of the masking region 21 becomes an optical black. A signal of the masking region 21 is outputted as an optical black portion from the CCD image pickup device at a head timing of every line. Only a component of the dark current is outputted from the optical black portion. A clamp level is obtained from the output of the optical black portion. The clamp level formed by extracting the optical black portion is subtracted from the image pickup output of the CCD image pickup device. Thus, the optical black portion in the output of the CCD image pickup device is clamped so as to be set to the black level (namely, 0 level). Thus, the dark current is removed and only the photoelectric conversion output can be extracted.
Hitherto, the clamping circuit for setting the optical black portion in the output of the CCD image pickup device to the black level has such a construction that the clamp level is obtained from a signal of an optical black portion in an output of a CCD image pickup device 102 by a microcomputer 106 for a camera as shown in FIG. 2.
In FIG. 2, reference numeral 101 denotes a lens portion. The lens portion 101 has a zoom lens, a focusing lens, an aperture mechanism, its driving circuit, and the like. An image pickup portion is constructed by the lens portion 101 and CCD image pickup device 102. Object image light transmitted through the lens portion 101 is formed as an image onto a photosensing surface of the CCD image pickup device 102.
As shown in FIG. 1, the masking region 21 serving as an optical black portion is provided for the CCD image pickup device 102. The output of the CCD image pickup device 102 is supplied to a sample and hold and AGC circuit 103. The output of the CCD image pickup device 102 is sampled and held and amplified to a predetermined level by the sample and hold and AGC circuit 103. An output of the sample and hold and AGC circuit 103 is supplied to an A/D converting circuit 104. The image pickup signal of the CCD image pickup device 102 is converted into a digital signal by the A/D converting circuit 104.
An output of the A/D converting circuit 104 is supplied to a subtractor 107 and supplied to a detecting circuit 105. A clamp pulse for extracting an optical black level (namely, masking region 21) in the head portion of each line is supplied to the detecting circuit 105 from an input terminal 110. The head optical black level of each line is extracted by the detecting circuit 105 and its level is detected. The head optical black level is supplied to the microcomputer 106.
The microcomputer 106 integrates detection results of the optical black levels of a plurality of lines and calculates an average clamp level. The average clamp level calculated by the microcomputer 106 is supplied to the subtractor 107. In the subtractor 107, the clamp level obtained by the microcomputer 106 is subtracted from the output of the A/D converting circuit 104. Thus, the optical black level of the CCD image pickup device 102 is clamped to xe2x80x9c0xe2x80x9d.
An output of the subtractor 107 is supplied to a luminance signal separating circuit 108 and a chroma signal separating circuit 109 of a camera signal processing circuit 114. In the luminance signal separating circuit 108, a luminance signal is separated and a process for the luminance signal is performed. An output of the luminance signal separating circuit 108 is outputted from an output terminal 111. In the chroma signal separating circuit 109, a chroma signal is separated and a process for the chroma signal is performed. An output of the chroma signal separating circuit 109 is outputted from an output terminal 112.
As mentioned above, hitherto, the detecting circuit 105 extracts the optical black portions of a plurality of lines and detects their levels. In the microcomputer 106, the average clamp level is calculated from the detection results of the optical black levels of a plurality of lines. In the subtractor 107, the clamp level formed by averaging the detection results of the optical black levels of a plurality of lines is subtracted from the output of the CCD image pickup device 102. In this manner, the clamping circuit is constructed.
However, when the microcomputer 106 obtains the clamp level as mentioned above, the processes of the microcomputer 106 are occupied for such a period of time and become a burden when the other processes are executed by the microcomputer 106.
It is, therefore, considered that the clamping circuit for setting the level of the optical black portion of the CCD image pickup device 102 to the black level is constructed by hardware. In this case, it is possible to construct so as to calculate the clamp level by using the detection result of the optical black level of each line. By using such a construction, the clamp level fluctuates every line and a problem of the occurrence of a line flicker occurs. It is, therefore, necessary to obtain the clamp level by averaging the detection results of the optical black levels of a plurality of lines. However, to average the detection results of the optical black levels of a plurality of lines, a circuit for storing the optical black levels of respective lines and averaging those levels is necessary, so that the circuit scale increases.
It is, therefore, an object of the invention to provide a clamping apparatus and a clamping method which can solve the above problems.
To solve the above problems, according to the invention, there is provided a clamping apparatus comprising: a circuit for masking a part of a solid state image pickup device and photoelectrically converting a signal of a dark current component which is outputted from the solid state image pickup device and corresponds to a masking portion and a photosignal which is outputted from the solid state image pickup device and corresponds to a non-masking portion; an integrating portion for sampling and integrating the dark current component signal corresponding to the masking portion every line; an averaging portion for averaging an integration value which is obtained by the integrating portion; a comparing portion for comparing an average value of each line averaged by the averaging portion, thereby detecting a change state of the average value; a clamp level control portion for holding the average value when a comparison result of the comparing portion lies within a predetermined range and changing the average value so as to have a predetermined gradation when the comparison result of the comparing portion is out of the predetermined range; and a subtracting portion for subtracting the average value derived from the clamp level control portion from an output of the photoelectric converting circuit, wherein the signal is clamped on the basis of the signal of the dark current component that is outputted from the solid state image pickup device.